//
//  DMLParallaxHeader.h
//  DMLParallaxHeader
//
//  Created by 戴明亮 on 2017/9/7.
//  Copyright © 2017年 DML. All rights reserved.
//

#import <UIKit/UIKit.h>

@class DMLParallaxHeader;

@protocol DMLParallaxHeaderDelegate <NSObject>

@optional
- (void)parallaxHeaderDidScroll:(DMLParallaxHeader *_Nullable)parallaxHeader;

@end

@interface DMLParallaxHeader : NSObject

@property (nonatomic,readonly,nullable) UIView *contentView;

@property (nonatomic, strong, nullable) UIView *view;

// 加上IBInspectable就可以可视化显示相关的属性哦
// 整个头部的高度
@property (nonatomic, assign) IBInspectable CGFloat height;
// 可滑动到最小的高度
@property (nonatomic, assign)  CGFloat minimumHeight;

@property (nonatomic, readonly) CGFloat progress;

@property (nonatomic, weak,nullable) id <DMLParallaxHeaderDelegate>delegate;

@end


// 添加 UIScrollView 的 分类
@interface UIScrollView (DMLParallaxHeader)
@property (nonatomic, strong,nullable) DMLParallaxHeader *parallaxHeader;
@end
